<template>
	<div class="page">
		<!-- header -->
		<div class="login-header">
			<div class="logo" @click="goLogin"></div>
			<p class="title" v-text="title"></p>
		</div>
		<!-- body -->
		<router-view></router-view>
		<!-- footer -->
		<div class="login-footer">
			<p class="login-footer-content">
				<span>2017</span>
				<span>CMDB</span>
				<span>京ICP证00001号</span>
				<span>京公网安备11010502000001号</span>
				<span>电子公告服务规</span>
			</p>
		</div>
	</div>
</template>

<script>
import AccountService from '@/services/AccountService.js'

export default {
	name: 'cmdb-p-login',
	data() {
		return {
			title: '登录'
		}
	},
	mounted() {
		if (this.$route.name == 'accountForgetPwd') {
			this.title = '找回密码';	
		} else {
			this.title = '登录'
		}
	},
	watch: {
		'$route': function(val) {
			if (val.name == 'accountForgetPwd') {
				this.title = '找回密码';	
			} else {
				this.title = '登录'
			}
		}
	},
	methods: {
		goLogin() {
			this.$router.push({
				name: 'userLogin'
			})
		}
	}
}
</script>

<style scoped>
.page {
	
}
.login-header {
	min-width: 1000px;
	height: 84px;
	line-height: 84px;
	border-bottom: 1px solid #e0e0e0;
	position: relative;	
}
.logo {
	width: 200px;
	height: 84px;
	background: url(../assets/logo_CMDB.png) center center;
	background-repeat: no-repeat;
	background-size: 200px 24px;
	position: absolute;
	top: 0px;
	left: 100px;
	cursor: pointer;
}
.title {
	font-size: 24px;
	height: 84px;
	color: rgba(0,0,0,0.87);
	text-align: center;
}
.login-footer {
	width: 100%;
	min-width: 1000px;
	height: 100px;
	line-height: 100px;
	text-align: center;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
}
.login-footer-content {
	font-size: 14px;
	color: rgba(0,0,0,0.54);
}

</style>
<style>
.ivu-checkbox-wrapper {
	font-size: 14px;
}
.ivu-form-item {
	margin-bottom: 20px;
}
</style>